Arguments
dem
RasterLayer object with elevation values in map units, or in meters when the crs is longitude/latitude
filename
Character. Filename. optional
type
Character. 'slope', 'aspect', or 'both' (=default, slope and aspect)
unit
Character. 'degrees' or '' (=default, radians for aspect, and fraction for slope)
neighbors
Integer. Indicating how many neighboring cells to use to compute slope for any cell. Either 8 (queen case) or 4 (rook case), see Details.
flatAspect
Numeric or NA. What value to use for aspect when slope is zero (and hence the aspect is undefined)? The default value is 90 degrees (or 0.5*pi radians)
...
Standard additional arguments for writing RasterLayer files